<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<body>
	<ui:composition>

		<p:fieldset legend="Create" toggleable="true" toggleSpeed="500"
			collapsed="true">

			<p:outputPanel style="text-align:center;">
				<p:panelGrid columns="3" columnClasses="label,value">

					<h:outputText value="Project Code" />
					<h:inputText id="code2" value="#{dtProjectLazyView.code}"
						maxlength="15" required="true"
						requiredMessage="Project code is mandatory!" />
					<h:message for="code2" style="color:red" />

					<h:outputText value="Description" />
					<h:inputText id="description2"
						value="#{dtProjectLazyView.description}" maxlength="255"
						required="true"
						requiredMessage="Project description is mandatory!" />
					<h:message for="description2" style="color:red" />

					<h:outputText value="Job Number" />
					<h:inputText id="jobNumber2" value="#{dtProjectLazyView.jobNumber}"
						maxlength="10"  />
					<h:message for="jobNumber2" style="color:red" />

					<h:outputText value="Default Warehouse" />
					<p:selectOneMenu id="warehouse2"
						style="text-align:right;" value="#{dtProjectLazyView.warehouse}">
						<f:selectItem itemLabel="Select Warehouse" itemValue="" />
						<f:selectItems var="warehouse"
							value="#{dtProjectLazyView.warehouses}"
							itemLabel="#{warehouse.name}"
							itemValue="#{warehouse.id}" />
					</p:selectOneMenu>
					<h:message for="warehouse2" style="color:red" />

				</p:panelGrid>

				<br />
				<p:commandButton value="Create Project" update="@form"
					action="#{dtProjectLazyView.createProject}" />

			</p:outputPanel>

		</p:fieldset>
	</ui:composition>
</body>
</html>